package com.zzw.basic.fanxing;

import java.util.ArrayList;
import java.util.Collection;

public class GenericMethodTest {

	static <T> void fromArrayToCollection(T[] a,Collection<T> c){
		for(T o:a){
			c.add(o);
		}
	}
	
	public static void main(String[] args) {
		String[] s = {"1","2","3"};
		Collection<String> c = new ArrayList<>();
		GenericMethodTest.fromArrayToCollection(s, c);
	}
}
